package com.zrf.base.knowledge.constant.pool;

/**
 * @date 04/05/2020
 * @AUTHER zhouruifeng
 */
public class ConstantPoolTest {
    public static void main(String[] args) {
        String s1 = new String("he") + new String("llo");
        String s2=new String("h")+new String("ello");
        String s3=s1.intern();
        String s4=s2.intern();
        System.out.println(s1==s3);
        System.out.println(s1==s2);
        System.out.println(s1==s4);


    }
}
